Skip to content

fix(s2): enforce 1 rps throttling across S2 stages#6

Merged
spignotti merged 1 commit intomainfrom
fix/s2-rate-limit-throttling
Mar 23, 2026
Merged

fix(s2): enforce 1 rps throttling across S2 stages#6
spignotti merged 1 commit intomainfrom
fix/s2-rate-limit-throttling

Conversation

@spignotti
Copy link
Copy Markdown
Owner

Summary

  • add s2_requests_per_second setting (default 1.0) to match Semantic Scholar key limits
  • throttle outbound S2 calls in discovery and enrichment stages
  • update litresearch.toml.example with S2 timeout + rate settings
  • add discovery-stage test to verify throttling wait behavior

Why

Semantic Scholar key limit is 1 request/second cumulative. This change enforces that behavior by default.

Validation

  • uv run nox -s lint typecheck test
  • all sessions passed (24 tests)

Add configurable s2_requests_per_second (default 1.0) and throttle
requests in discovery and enrichment to respect Semantic Scholar
rate limits. Update example config and add discovery rate-limit test.
@spignotti spignotti merged commit c4bb8e4 into main Mar 23, 2026
2 checks passed
@spignotti spignotti deleted the fix/s2-rate-limit-throttling branch March 23, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant